﻿using Abp.AspNetCore.Mvc.Controllers;
using Batman.Open.Accounts.Domains;
using Batman.Open.Accounts.Handles;
using Microsoft.AspNetCore.Mvc;

namespace Batman.Open.Accounts.Controllers
{
    public class WeixinMiniProgramController : AbpController
    {
        public WeixinHandler WeixinHandler { get; set; }

        public IActionResult Create()
        {
            var model = new OpenAccount();
            return View(model);
        }

        public IActionResult LoginForUserInfo(string appId, string code)
        {
            var result = WeixinHandler.Code2Seesion(appId, code);
            return Json(result);
        }
    }
}
